home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ShareWare OnLine 2
/
ShareWare OnLine Volume 2 (CMS Software)(1993).iso
/
prog
/
pbc22b.zip
/
PBC$BAS.ZIP
/
PARSEFSP.BAS
< prev
next >
Wrap
BASIC Source File
|
1993-01-01
|
1KB
|
35 lines
' +----------------------------------------------------------------------+
' | |
' | PBClone Copyright (c) 1990-1993 Thomas G. Hanlin III |
' | |
' +----------------------------------------------------------------------+
DECLARE SUB RInstr (MainSt$, SubSt$, Posn%)
SUB ParseFSpec (FileSpec$, Drive$, DLen%, Subdir$, SLen%, File$, FLen%)
F$ = FileSpec$
IF MID$(F$, 2, 1) = ":" THEN
MID$(Drive$, 1) = LEFT$(F$, 1)
DLen% = 1
F$ = MID$(F$, 3)
ELSE
DLen% = 0
END IF
RInstr F$, "\", Place%
IF Place% THEN
IF Place% = 1 THEN
MID$(Subdir$, 1) = "\"
SLen% = 1
ELSE
MID$(Subdir$, 1) = LEFT$(F$, Place% - 1)
SLen% = Place% - 1
END IF
MID$(File$, 1) = MID$(F$, Place% + 1)
FLen% = LEN(MID$(F$, Place% + 1))
ELSE
SLen% = 0
MID$(File$, 1) = F$
FLen% = LEN(F$)
END IF
END SUB